July 90 - THE INS AND OUTS OF ISO 9660 AND HIGH SIERRA
THE INS AND OUTS OF ISO 9660 AND HIGH SIERRA
BRIAN BECHTEL WITH HIS DAUGHTER MEG
Any CD-ROM can be read at the bit level by any CD-ROM player, thanks to the
existence of standards for the physical format of such discs. Having this physical
format in common is nice, but it's not enough. We also need to be able to find specific
files on a CD, no matter which operating system we are using; we need a standard file
system format. High Sierra and its international equivalent ISO 9660 are standards
that define a file system usable under a variety of operating systems. This article
explores these standards and their implementation on the Macintosh, and discusses a
simple program you'll find on the accompanying Developer Essentials disc to convert
Macintosh files to ISO 9660 format.
A file system organizes data logically on a CD. Different operating systems use
different file systems to organize data, and thus a CD formatted with a native file
system can only be read by one particular operating system. To overcome this obvious
limit to the usefulness of CD-ROM as a storage and distribution medium, the industry
has established standards for a file system that can be used under a variety of
operating systems. The ISO 9660 standard and its predecessor High Sierra define a file
system carefully attuned to CD-ROM characteristics.
In particular, because CDs have a relatively slow seek time and a high capacity, these
standards make trade-offs that reduce the number of seeks needed to read a file, at the
expense of space efficiency. And because CDs are read-only, concerns like space
allocation, file deletion, and the like are not addressed in the standards. The standards
apply only to the data track of a CD-ROM, not to audio tracks; and they do not apply to
any media other than CD-ROM, such as erasable-optical drives. The standards do not
favor any particular computer architecture. All significant multibyte numbers are
recorded twice, once with the most significant byte first (msb order, used by Intel
processors such as those in MS-DOS compatible computers) and once with the least
significant byte first (lsb order, used by Motorola microprocessors such as those in
the Macintosh). This enables easy implementation under a variety of operating
systems, such as the Macintosh operating system, Apple II ProDOS 16 or GS/OS,
MS-DOS, VMS, and the UNIX operating system. Let's look now at how the two standards
developed.
ISO 9660 AND HIGH SIERRA: SOME HISTORY
A group of industry representatives met at Del Webb's High Sierra Hotel and Casino at
Lake Tahoe, Nevada, in late 1985 to see if companies could cooperate in developing a
common file system format for CD-ROM. The result of this series of meetings was the
High Sierra format. This format is fully specified by the May 28, 1986 Working
Paper for Information Processing--Volume and File Structure of Compact Read-Only
Optical Discs for Information Interchange. For obvious reasons, this is known as the
High Sierra paper.
The world at large then wanted to adopt an equivalent standard. The International
Organization for Standardization pushed High Sierra through its standardization
process, resulting in the international standard known as ISO 9660. (The organization
is called the International Organization for Standardization, but the standard is ISO
9660 .) This standard is described in the paper ISO 9660--Volume and File Structure
of CD-ROM for Information Interchange , known in the CD-ROM trade as the ISO
standard.
Apple's Macintosh operating system and GS/OS, plus Microsoft's operating system
MS-DOS, support both the ISO 9660 standard and the older High Sierra format.
ISO 9660 is the wave of the future--many existing CD-ROMs use the High Sierra
format, but everyone is changing over to the ISO 9660 standard, and most if not all
future discs will be in ISO 9660 format rather than High Sierra format. In the
meantime, because "ISO 9660" doesn't roll off the tongue quite as nicely as "High
Sierra," many people in the industry say "High Sierra" when they really mean "ISO
9660" or "whatever that damn format is that my CD-ROM is supposed to be in." In
this article, I do not use the terms interchangeably, but explicitly state which format
I'm referring to. But for practical purposes, what I say about one format also applies
to the other, with the exceptions I note.
HOW THE FORMATS ARE IMPLEMENTED ON THE MACINTOSH
The Macintosh supports both ISO 9660 and High Sierra through the use of a feature in
the Macintosh file system called the external file system hook. This is a low-memory
global that contains a pointer to an external file system handler to which multiple
handlers are daisy-chained. To support ISO 9660 and High Sierra, Apple has written a
new set of routines, contained in a file called Foreign File Access. This file, combined
with the files High Sierra File Access and ISO 9660 File Access, provides complete
support for the standard formats.
Because the ISO 9660 and High Sierra formats are supported via Foreign File Access
instead of software that's part of a device driver, you can use any media to create a
standard-format volume. In actual use, ISO 9660 and High Sierra only make sense on a
CD-ROM; but you can create a test volume using any floppy or hard disk.
A LOOK AT THE FORMATSThe ISO 9660 standard and the older High Sierra format
define each CD-ROM as a volume. Volumes can contain standard file structures, coded
character set file structures for character encoding other than ASCII, or boot records.
Boot records can contain either data or program code that may be needed by systems or
applications. ISO 9660 and High Sierra specify
• how to describe an arbitrary location on the volume--the logical format
of the volume;
• how to format and what to include in the descriptive information
contained by each volume about itself--the volume descriptors;
• how to format and what to include in the path table, which is an easy way
to get to any directory on the volume;
• how to format and what to include in the file directories and the directory
records, which contain basic information about the files on the volume such as
the filename, file size, file location, and so forth.
The discussion that follows is a reasonably technical description of the standards in
each of these areas; it is not the definitive description. For the one true, proper
definition of the standards, read the original specifications.
THE LOGICAL FORMAT
CD-ROMs are laid out in 2048-byte physical sectors. This physical layout is defined
in a standard published by Philips and Sony known as the Yellow Book, and is
independent of the type of volume formatting used. Under ISO 9660 and High Sierra,
the CD is also laid out in 2048-byte logical sectors. Both formats also have the concept
of a logical block, which is the smallest chunk of file data. A logical block can be 512,
1024, or 2048 bytes. In general, file access information is laid out in sector-sized
units, while actual file data is laid out in block-sized units. On most CDs, the block
size is the same as the sector size at 2048 bytes, so this distinction isn't important.
Figure 1 shows the layout of a volume in ISO 9660 or High Sierra format.
Figure 1 A Volume in ISO 9660 or High Sierra Format
THE VOLUME DESCRIPTORS
Information about the volume itself is contained in an array of 2048-byte entries,
beginning at logical sector 16 on the disc, as shown in Figure 1. These are the volume
descriptors. There are five types of volume descriptors: the primary volume